Development · Native API migration preview · Coverage validation in progress Published release →

API Browser

Interface

Map<K, V>

interface Map<K, V>

Module: System.Collections
Assembly: System.Runtime.dll
Source file: Map.rvn

Inherits: Iterable<KeyValuePair<K, V>>

Read-only key lookup, key/value pair iteration, key enumeration and entry count capabilities.

Remarks

Find returns None for a missing key; the indexer getter faults. The interface alone does not require Keys to be a snapshot; HashMap documents its own snapshot behavior.

Derived interfaces

Documented types in this API reference. Indirect relationships are marked.

Implementing types

Documented types in this API reference. Indirect relationships are marked.

Properties

2 items
Count: int Gets the number of elements or entries. Defined by Map<K, V>.Count · Required implementation (no default).
Keys: Sequence<K> Gets the keys exposed by this map. Defined by Map<K, V>.Keys · Required implementation (no default).

Indexers

1 item
Item[key: K]: V Gets the value associated with a key; faults when the key is absent. Defined by Map<K, V>.Item · Required implementation (no default).

Methods

25 items
Extension member: All(predicate: (KeyValuePair<K, V>) -> bool) -> bool No summary available. Extension from Operators.All
Extension member: Any(predicate: (KeyValuePair<K, V>) -> bool) -> bool No summary available. Extension from Operators.Any
Extension member: Any() -> bool Tests whether the source contains an element, or an element satisfying the supplied predicate. Extension from Operators.Any
Extension member: Concat(second: Iterable<KeyValuePair<K, V>>) -> Iterable<KeyValuePair<K, V>> Enumerates the first source followed by the second source. Extension from Operators.Concat
ContainsKey(key: K) -> bool Tests whether the map contains an entry for the supplied key. Defined by Map<K, V>.ContainsKey · Required implementation (no default).
Extension member: Count(predicate: (KeyValuePair<K, V>) -> bool) -> int No summary available. Extension from Operators.Count
Extension member: Count() -> int Counts source elements, optionally restricted by the supplied predicate. Extension from Operators.Count
Extension member: Filter(predicate: (KeyValuePair<K, V>) -> bool) -> Iterable<KeyValuePair<K, V>> No summary available. Extension from Operators.Filter
Find(key: K) -> Optional<V> Returns the value associated with the key, or None when the key is absent. Defined by Map<K, V>.Find · Required implementation (no default).
Extension member: First(predicate: (KeyValuePair<K, V>) -> bool) -> Optional<KeyValuePair<K, V>> No summary available. Extension from Operators.First
Extension member: First() -> Optional<KeyValuePair<K, V>> Returns the first source element matching the optional predicate, or None when none exists. Extension from Operators.First
Extension member: FlatMap<U>(selector: (KeyValuePair<K, V>) -> Iterable<U>) -> Iterable<U> No summary available. Extension from Operators.FlatMap
Extension member: Fold<U>(seed: U, accumulator: (U, KeyValuePair<K, V>) -> U) -> U No summary available. Extension from Operators.Fold
GetIterator() -> Iterator<KeyValuePair<K, V>> Creates an iterator over the elements. Inherited from Iterable<KeyValuePair<K, V>>.GetIterator · Defined by Iterable<KeyValuePair<K, V>>.GetIterator · Required implementation (no default).
Extension member: Last(predicate: (KeyValuePair<K, V>) -> bool) -> Optional<KeyValuePair<K, V>> No summary available. Extension from Operators.Last
Extension member: Last() -> Optional<KeyValuePair<K, V>> Returns the last source element matching the optional predicate, or None when none exists. Extension from Operators.Last
Extension member: Map<U>(selector: (KeyValuePair<K, V>) -> U) -> Iterable<U> No summary available. Extension from Operators.Map
Extension member: OfType<U>() -> Iterable<U> Lazily retains non-null elements compatible with the requested result type, preserving order. Extension from Operators.OfType
Extension member: Single() -> Result<KeyValuePair<K, V>, SingleError> Returns the sole matching element, or SingleError.Empty or SingleError.Multiple for a cardinality mismatch. Extension from Operators.Single
Extension member: Skip(count: int) -> Iterable<KeyValuePair<K, V>> Returns an iterable that skips the requested number of leading elements. Extension from Operators.Skip
Extension member: Take(count: int) -> Iterable<KeyValuePair<K, V>> Returns an iterable containing at most the requested number of leading elements. Extension from Operators.Take
Extension member: ToList() -> ArrayList<KeyValuePair<K, V>> Materializes the source into a new ArrayList in enumeration order. Extension from Operators.ToList
Extension member: ToMap(comparer: EqualityComparer<K>) -> HashMap<K, V> Copies pairs into a new map using an explicit key comparer. Extension from MapOperators.ToMap